/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model.game.night.plugin;

import model.game.GameInterface;
import model.game.night.MonsterWave;

/**
 * First wave (example only actually)
 * length: 20 actions
 * monsters :
 * appearance | monster name
 * 5          | Pig
 */
public class Wave001 extends MonsterWave {

    /**
     * Constructor
     */
    public Wave001(GameInterface game) {
        super(game);
    }

    @Override
    public void spawnMonsterAtCurrentTime() {
        if (time_elapsed_ == 1) {
            game_.getCreatures().getMonsters().spawnMonsterFromName(
                    "Pig",
                    game_.getMaps().getField().getCellAt(8, 10));
        }
        if (time_elapsed_ == 3) {
            game_.getCreatures().getMonsters().spawnMonsterFromName(
                    "Pig",
                    game_.getMaps().getField().getCellAt(8, 10));
        }
        if (time_elapsed_ == 5) {
            game_.getCreatures().getMonsters().spawnMonsterFromName(
                    "Pig",
                    game_.getMaps().getField().getCellAt(8, 10));
        }
    }

    @Override
    public int getOrder() {
        return 1;
    }

    @Override
    public void endNight() {
        game_.getCreatures().getMonsters().removeAllMonsters();
    }

    @Override
    public int getNightLength() {
        return 100;
    }
}
